package com.czbank.financing.service.impl;

import com.czbank.financing.Entity.Role;
import com.czbank.financing.mapper.RoleMapper;
import com.czbank.financing.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class RoleImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;
    @Override
    public List<Role> selectRoleList() {
        return roleMapper.TotalRole();
    }

    @Override
    public Role selectRoleById(long id) {
        return roleMapper.selectRoleById(id);
    }

    @Override
    public int updateRole(Role role) {
        return roleMapper.updateRole(role);
    }

    @Override
    public int addRole(Role role) {
        return roleMapper.addRole(role);
    }

    @Override
    public int deleteRole(long id) {
        return roleMapper.deleteRole(id);
    }
}
